package com.hedl.classroom.controller;

import com.hedl.classroom.base.model.PageParams;
import com.hedl.classroom.dto.SearchCourseParamDto;
import com.hedl.classroom.dto.SearchPageResultDto;
import com.hedl.classroom.po.CourseIndex;
import com.hedl.classroom.service.CourseSearchService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Big Watermelon
 * @description 课程搜索接口
 * @date 2023/11/18/19:10
 */

@Api(value = "课程搜索接口",tags = "课程搜索接口")
@RestController
public class CourseSearchController {

    @Resource
    CourseSearchService courseSearchService;


    @ApiOperation("课程搜索列表")
    @GetMapping("/course/list")
    public SearchPageResultDto<CourseIndex> list(PageParams pageParams,SearchCourseParamDto searchCourseParamDto){
        return courseSearchService.queryCoursePubIndex(pageParams,searchCourseParamDto);
    }
}
